package edu.hziee.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import edu.hziee.mapper.CourseMapper;
import edu.hziee.models.Course;

@Repository
public class CourseDao {

	@Autowired
	CourseMapper coursemapper;
	
    public List<Course> findAll(){
		return coursemapper.findAll();
	}
    
	public Course findById(int cid){
		return coursemapper.findById(cid);
	}

	public void addCourse(Course course){
		coursemapper.addCourse(course);
	}
	
	public void modify(Course course){
		coursemapper.modify(course);
	}
	
	public void delete(int cid){
		coursemapper.delete(cid);
	}
}
